// @flow
import test from '../../index.js.flow';

test('test', t => {
	t.throws((): void => { throw new Error(); });
	t.throws(Promise.reject(new Error()));

	t.notThrows((): void => { return; });
	t.notThrows(Promise.resolve('Success'));

	const error = t.throws((): void => { throw new Error(); });
	const message: string = error.message;

	const promise = t.throws(Promise.reject(new Error()));
	promise.then(error => {
		const message: string = error.message;
	});
});
